package com.example.springboot_druid_mybatis_jta.dao;

import com.example.springboot_druid_mybatis_jta.bean.Programmer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : wise-wang
 * 2021.12.05
 * dao层，接口类，用于定义操作数据库中表的方法
 */
@Mapper
public interface ProgrammerMapper {

    List<Programmer> selectAll(String dataSource);

    void save(Programmer programmer);

    Programmer selectById(int id);

    int modify(String dataSource,@Param("pro") Programmer programmer);

    void delete(int id);
}
